import React, { Component,useState } from 'react';
import { Link } from "react-router-dom";



class CardList2 extends Component {
    static propTypes = {

    }

    static defaultProps = {

    }
    constructor(props) {
        super(props)
        this.state = {

        }
    }
    render() {
      let { dt } = this.props
      // if (dt.length == 0) {
      //   return <div>21212</div>
      // }
      if (1123) {
        return <div>21212</div>
      }
        return (
          <div className="yt box-wrap">
            <div className="yt yt-ver  box-left"><div className={["yt-self-center", "condition-type", dt.updownValue === 1 ? "condition-type-up" : "condition-type-down"].join(' ')}>{dt.updownValue === 1 ? '涨' : '跌'}</div></div>
            <div className="yt-f1">
              <Link to={"/post/" + dt.id}>
                <div className="box-item-title">{dt.stk_name}{dt.stk_code}</div>
              <div className="yt yt-bm">
                  {dt.tag && dt.tag.map((v, k) => { 
                  return (
                    <div key={v.tagId} className={["box-tag-item", dt.updownValue === 1 ? "box-tag-item-up" : "box-tag-item-down"].join(' ')}>{v.tagCnName}</div>
                  )
                })}
              </div>
                <div className="box-desc">{dt.post}</div>
                </Link>
              </div>
           
            
            </div>
        )
    }
}

function Meta(props) { 
    return (
        <div className="yt yt-pj box-icons">
            <div className="yt yt-f1  yt-ac"><i className="alifont font12">&#xe607;</i><span className="icon-text">{props.discus}</span></div>
            <div className="yt yt-f1  yt-ac"><i className="alifont font12">&#xe609;</i><span className="icon-text">{props.discus}</span></div>
            <div className="yt yt-f1  yt-ac"><i className="alifont font12">&#xe64f;</i><span className="icon-text">{props.discus}</span></div>
            <div className="yt yt-f1 yt-pe yt-ac"><i className="alifont font12">&#xe637;</i></div>
        </div>
    )
}

export default CardList2
